import tableIcon from '../svg/table.svg';
export default () => {
    return {
        componentName: "LowTable",
        text: "高级表格",
        icon: tableIcon,
        noUseForm: true,
        props: {
            border: true,
            stripe: true,
            hidePagination: false,
            hideDo: false,
            size: "default",
            height: "auto",
            "row-key": "id",
            data:[
                {
                    "name": "重庆希尔安制药有限公司",
                }
            ],
            column: [
        {
            "prop": "name",
            "label": "姓名",
            "fixed": "left",
            "render": "return `<span style='color: ${scope.row.gender === '男' ? 'blue' : 'pink'}'>${scope.row.name}</span>`"
        },
        {
            "prop": "action",
            "label": "操作",
            "slots": {
                "default": (scope) => ({
                    render: h => h('el-button', {
                        on: {
                            click: () => window.edit(scope.row.id)
                        }
                    }, '编辑')
                })
            }
        }
    ],
    },
        children: [],
        // 新增表格事件配置
        events: [
            {
                name: "row-click",
                description: "当某一行被点击时会触发该事件"
            },
            {
                name: "selection-change",
                description: "当选择项发生变化时会触发该事件"
            }
        ]
    };
};
